#!/bin/bash
#chkconfig:2345 80 80
#description:zookeeper
#processname:zookeeper
export JAVA_HOME=/usr/local/src/jdk1.8.0_181
export ZOO_LOG_DIR=/root/gongjiao/zoolog
case $1 in
        start) su root  /usr/local/src/zookeeper-3.4.10/bin/zkServer.sh start;;
        stop) su root  /usr/local/src/zookeeper-3.4.10/bin/zkServer.sh stop;;
        status) su root  /usr/local/src/zookeeper-3.4.10/bin/zkServer.sh status;;
        restart) su root  /usr/local/src/zookeeper-3.4.10/bin/zkServer.sh restart;;
        *) echo "require start|stop|status|restart" ;;
esac